{include file="public/header" /}

<!--<body style="background-image:url(/dist/img/xjddLogo.png);background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;">-->
<link rel="stylesheet" href="__CSS__/login.css" media="all">
<body style="background-image:url(/dist/imgs/bg3.jpg);background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;">
<div class="layadmin-user-login layadmin-user-display-show content" id="LAY-user-login" style="display: none;">
    <div class="layadmin-user-login-main" style="margin-top:5%;background: #FFFFFF;border-radius: 15px;padding:15px 0 15px 0; width:;">
        <div class="layadmin-user-login-box layadmin-user-login-header">
            <div class="title">{$title}</div>
        </div>
        <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
            <div class="layui-form-item">
                <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
                <input type="text" name="UserName" id="LAY-user-login-username" lay-verify="required" placeholder="请输入账号" class="layui-input">
            </div>
            <div class="layui-form-item">
                <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-username"></label>
                <input type="password" name="Password" id="LAY-user-login-vercode" lay-verify="required" placeholder="请输入密码" class="layui-input">
            </div>
            <div class="layui-form-item">
                <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit">登 陆</button>
            </div>
        </div>
    </div>

</div>
</body>
<script src="__CSS__/layuiAdmin/layui/layui.js"></script>
<script src="__CSS__/jquery/jquery-3.3.1.min.js"></script>
<script src="http://cdn.highcharts.com.cn/highcharts/highcharts.js"></script>

<script>
    layui.config({
        base: '__CSS__/layuiAdmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'console','sample']);
</script>
<script>
    layui.use(['index', 'user'], function() {
        var $ = layui.$,
            setter = layui.setter,
            admin = layui.admin,
            form = layui.form,
            router = layui.router(),
            search = router.search;
        form.render();
        //提交
        form.on('submit(LAY-user-login-submit)', function(obj) {
            //请求登入接口
            admin.req({
                url: "{:url('admin/login/daichao')}",
                data: {'UserName':obj.field.UserName,'Password':obj.field.Password},
                done: function(res) {
                    //登入成功的提示与跳转
                    layer.msg('登入成功', {
                    }, function() {
                        window.location.href = "{:url('admin/count/default')}"; //后台主页
                    });
                }
            });
        });
    });
</script>